#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
int main(){
  pid_t id = fork();
  if(id==0){
    printf("I am child process\n");
    sleep(5);
    return 0;
  }
  int status=0;
  pid_t n = waitpid(id,&status,0);
  if(WIFEXITED(status)){
    printf("%d\n",WEXITSTATUS(status));
  }
  return 0;
}
